/**
 * @author: htqw
 * @param {import("mysql2").Connection} connection
 * @param {string} table
 */
export default async function dropTable(connection, table) {
    new Promise((resolve, reject) => {
        connection.query(`DROP TABLE IF EXISTS ${table}`, (err, result) => {
            if (err) reject(err)
            else resolve(result)
        })
    })
}